<h1>Editar documento </h1>
<?php if($sf_user->hasFlash('msg')){ ?>
<div class="message">
  <?php echo $sf_user->getFlash('msg') ?>
</div>
<br />
<?php } ?>
<form action="<?php echo url_for('@documentos_edit_save') ?>" method="post" id="frm" enctype="multipart/form-data" autocomplete="off">
    <input type="hidden" name="id" value="<?php echo $documentos->getId(); ?>" />
<table width="100%" cellpadding="5" cellspacing="5">
  <tr>
    <td>T&iacute;tulo</td>
    <td colspan="2"><input type="text" name="titulo" value="<?php echo $documentos->getTitulo(); ?>" /></td>
  </tr>
  <tr>
    <td>Autor</td>
    <td colspan="2"><input type="text" name="autor" value="<?php echo $documentos->getAutor(); ?>" /></td>
  </tr>

  <tr>
    <td>Fecha de publicaci&oacute;n</td>
    <td colspan="2"><input type="text" name="date" placeholder="dd/mm/yy" value="<?php echo $documentos->getFechapublicacion(); ?>" /></td>
  </tr>
  <tr>

    <td>N&uacute;mero</td>
    <td colspan="2"><input type="text" name="numero" value="<?php echo $documentos->getNumorden(); ?>" /></td>
  </tr>
  <tr>
    <td>PDF</td>
    <td>
        <?php $DS = DIRECTORY_SEPARATOR; ?>
        <?php if(file_exists(sfConfig::get('sf_upload_dir').$DS."documentos".$DS.$documentos->getFilename())){ ?>
          <a href="<?php echo public_path('uploads/documentos/'.$documentos->getFilename(),true); ?>" target="_blank">Ver PDF</a>
        <?php } ?>
        <input type="file" name="pdf" />
    </td>
    <td><em style="color: gray;"></em></td>
  </tr>
  <tr>
      <td>Ejemplo URL</td>
      <td>http://localhost/ipdt/web/frontend_dev.php/descargas/descargar?id=4__20120913151254</td>

  </tr>


  <tr>
    <td colspan="3" align="center">
      <input type="submit" value="Guardar Cambios"  style="padding: 10px;" />
    </td>
  </tr>
</table>
</form>
<script type="text/javascript">
$(document).ready(function(){
    $("#search_title").keypress(function(e){
        if(e.keyCode==13){
            search();
            return false;
        }
    });
});


</script>